<template>
    <div>
        <router-link :to="'/author/' + author.loginname">
            <img :style="{ width: size + 'px', height: size + 'px' }" :src="author.avatar_url" :alt="author.loginname">
        </router-link>
    </div>
</template>

<script>
export default {
    props: {
        author: {
            type: Object,
            default: () => ({
                loginname: "wlm",
                avatar_url: "https://img0.baidu.com/it/u=236085137,1979895699&fm=253&fmt=auto&app=138&f=JPEG?w=360&h=360",
            })
        },
        size: {
            type: Number,
            default: 70,
        },
    }
}
</script>

<style scoped lang="scss">
    img{
        border-radius: 50%;
        filter: opacity(80%);
    }
</style>